<?php
/**
 * User: aka
 * Time: 0:23
 */

namespace app\tenno\controller;


class MessageBoard
{
    public function index()
    {
        $messageList = \app\tenno\model\Message::deleteState(0)
            ->paginate(10)
            ->each(
                function($item)
                {
                    $item->uid = \app\tenno\model\Users::userInfo($item->uid)
                        ->find();
                }
            );
        return view('index', ['message_list' => $messageList]);
    }
}